package com.loveprogrammer.eternity.skill.support.skills;

import com.loveprogrammer.eternity.enums.WeaponTypeEnum;
import com.loveprogrammer.eternity.model.Character;
import com.loveprogrammer.eternity.model.Monster;
import com.loveprogrammer.eternity.common.Tuple;

import java.util.List;

/**
 * @version 1.0.0
 * @description: 闪击
 * @author: eric
 * @date: 2022-08-11 16:49
 **/
public class SkillFlashAttack extends AbstractSkill {

    public SkillFlashAttack(int id, int baseInterval, int level, int order, int maxLevel, String name, String desc) {
        super(id, baseInterval, level, order, maxLevel, name, desc);
    }

    @Override
    public boolean check(Character character) {
        if(character instanceof Monster){
            return true;
        }
        // 检查是否持有匕首类武器
        return checkWeaponType(character,WeaponTypeEnum.DAGGER);
    }

    @Override
    public int opportunityPassive() {
        // 0为 主动技能
        return 0;
    }

    @Override
    public boolean checkLevelUp(int characterLevel) {
        // 每两级升一级
        if(characterLevel % 2 == 0){
            return true;
        }
        return false;
    }

    /***
     * 发动技能
     **/
    @Override
    public Tuple<String, List<Character>> skillLaunch(Character character,
                                                      List<? extends Character> attack,
                                                      List<? extends Character> defences) {
        return simpleSkillLaunch(character,defences,null);
    }

    @Override
    protected int computeHarm(Character character) {
        return 0;
    }

    @Override
    protected int computeSecondHarm(Character character) {
        return 0;
    }

}
